package com.bsj.power.sdk.config.hksdk.constant;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author yinhao
 * @version 1.0
 * @description 配置项
 * @date 2024/8/23
 */
@Component
public class HKSdkConstant {

    /**
     * cvr通道数
     */
    public static Integer cvr;
    /**
     * dll库文件地址
     */
    public static String path;
    /**
     * cvr-ip
     */
    public static String ip;
    /**
     * cvr-port
     */
    public static Integer port;
    /**
     * cvr-user
     */
    public static String user;
    /**
     * cvr-psw
     */
    public static String psw;
    /**
     * 多个cvr的登录信息
     */
    public static String auth;
    /**
     * 面板机信息文件路径
     */
    public static String facePath;


    /**
     * 附件路径
     */
    public static String annexPath;

    @Value("${hksdk.dll.cvr}")
    public void setCvr(Integer cvr) {
        HKSdkConstant.cvr = cvr;
    }

    @Value("${hksdk.dll.path}")
    public void setPath(String path) {
        HKSdkConstant.path = path;
    }

    @Value("${hksdk.dll.ip}")
    public void setIp(String ip) {
        HKSdkConstant.ip = ip;
    }

    @Value("${hksdk.dll.port}")
    public void setPort(Integer port) {
        HKSdkConstant.port = port;
    }

    @Value("${hksdk.dll.user}")
    public void setUser(String user) {
        HKSdkConstant.user = user;
    }

    @Value("${hksdk.dll.psw}")
    public void setPsw(String psw) {
        HKSdkConstant.psw = psw;
    }

    @Value("${hksdk.dll.auth}")
    public void setAuth(String auth) {
        HKSdkConstant.auth = auth;
    }

    @Value("${annexFile.path}")
    public void setAnnexPath(String annexPath) {
        HKSdkConstant.annexPath = annexPath;
    }

    @Value("${annexFile.facePath}")
    public void setFacePath(String facePath) {
        HKSdkConstant.facePath = facePath;
    }
}
